package game.views;

import hx.ui.UIManager;
import hx.display.MovieClip;
import hx.display.Box;

/**
 * MP能量点功能
 */
@:build(hx.macro.UIBuilder.build("assets/views/MpPoint.xml"))
class MpPoint extends Box {
	override function onInit() {
		super.onInit();
		cding.stopAt(0);
	}

	public function setProgress(value:Float) {
		cding.stopAt(Math.floor(Math.max(1, value * 100)) - 1);
	}
}
